package com.zb.designmode.bridge.readthing.stream.impl;

import com.zb.designmode.bridge.readthing.stream.AbstractStream;

import java.net.HttpURLConnection;
import java.net.URL;

/**
 * <p>description：</p>
 * <p>copyright： copyright(C)2016-2099</p>
 * <p>Life is short,we need passion</p>
 * <p>Summary： </p>
 * <p>instructions： </p>
 * Date 3/16/21</p>
 * Author mac
 *
 * @version 1.0
 */
public class URLStream extends AbstractStream {
    public URLStream(String strFile) throws Exception {
        URL url = new URL(strFile);
        in = url.openStream();
        HttpURLConnection urlcon = (HttpURLConnection) url.openConnection();
        size = urlcon.getContentLength();
    }
}
